from config import BASE_URL
from page.page_lines import LinesPage
from page.page_login import LoginPage
from tools import DriverTools


class TestLines:
    def setup_method(self):
        driver = DriverTools.get_driver()
        driver.get(BASE_URL + '/common/member/login')
        self.login_page = LoginPage(driver)
        self.lines_page = LinesPage(driver)

    def teardown_method(self):
        DriverTools.quit_driver()

    def test_lines_success(self):
        self.login_page.login('13845555578', 'w123456')
        self.lines_page.lines('100', '测试', '8888')
        result = self.lines_page.get_lines_result()
        print(result)
        assert '100.00' in result
        self.lines_page.get_shot('pwd_error4.png')
        
